package com.example.deadletter.consumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author tianzhuang
 * @version 1.0
 * @date 2021/11/10 18:41
 */
@Component
public class consumer {

    @RabbitListener(queues = "deadqueuqe")
    public void msg(Message message) {
        String str = new String(message.getBody());
        System.err.println("这是死信队列："+str);
    }
}
